<template>
  <view class="content">
    <view class="components-title">
      <view class="components-title-t">gg-picker3</view>
      <view class="components-title-d">三级联动下拉选项</view>
    </view>
    <gg-nav-group label="无默认选项时，会默认选中第一条">
      <gg-picker3 label="三级联动选择" v-model="formData.picker" :dataLists="pickerLists" />
    </gg-nav-group>
    <gg-nav-group label="有默认选项">
      <gg-picker3 label="三级联动选择" v-model="formData.picker3" :dataLists="pickerLists" />
    </gg-nav-group>
  </view>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        picker: [],
        picker3: ['0', '01', '013'],
      },
      pickerLists: [
        {
          value: '0',
          text: '橘子',
          free: [
            {
              value: '01',
              text: '橘子汁',
              free: [
                { value: '011', text: '橘子汁011' },
                { value: '012', text: '橘子汁012' },
                { value: '013', text: '橘子汁013' },
              ]
            },
            {
              value: '02',
              text: '橘子汁1',
              free: [
                { value: '021', text: '橘子汁21' },
                { value: '022', text: '橘子汁22' },
                { value: '023', text: '橘子汁23' },
              ]
            },
            { value: '03', text: '橘子汁2' }
          ]
        },
        {
          value: '1',
          text: '柠檬',
          free: [
            { value: '11', text: '柠檬汁' }
          ]
        },
        {
          value: '2',
          text: '香蕉',
          free: [
            { value: '21', text: '香蕉汁' }
          ]
        }
      ]
    };
  },
  onLoad() { },
  methods: {

  }
}
</script>

<style>
page {
  background: #f1f1f1;
}
</style>
